import store from "@/store";

(() => {
    const svgRequire = require.context('./svg', false, /\.svg$/)
    const fileNames = []
    function patchFileName(name) {
        name = name.slice(2)
        return name.substring(0, name.lastIndexOf('.'))
    }
    svgRequire.keys().forEach(item => {
        svgRequire(item)
        fileNames.push(patchFileName(item))
    })
    // console.log(fileNames, 'fileNames')
    store.commit('icon/setIconList', fileNames)
})();

